Skip to content

Commit

Permalink
Merge pull request #675 from ScilifelabDataCentre/DDS-1686-Black-vers…
Browse files Browse the repository at this point in the history
…ion-should-be-the-same-locally-and-on-Github-actions

Dds 1686 Update black version in dev and github actions - Update linted files to 24.1.1
  • Loading branch information
rv0lt authored Jan 30, 2024
2 parents 7d99cf2 + ac2e478 commit c7ed477
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 16 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/lint-black-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ on:
paths:
- "**.py"

env:
INPUT_VERSION: 24.1.1

jobs:
PythonLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check code lints with Black
uses: jpetrucciani/black-check@master
- uses: psf/black@stable
with:
version: ${{ env.INPUT_VERSION }}
8 changes: 8 additions & 0 deletions SPRINTLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,11 @@ _Empty sprint_

- Patch update crypthography package to address cve ([#668](https://github.com/ScilifelabDataCentre/dds_cli/pull/668))
- New version: 2.6.1 ([#669](https://github.com/ScilifelabDataCentre/dds_cli/pull/669))

# 2023-12-15 - 2024-01-12

- Minor update jwcrypto package to address cve ([#674](https://github.com/ScilifelabDataCentre/dds_cli/pull/674))

# 2024-01-29 - 2024-02-09

- Use of a fix version of black and linted files to 24.1.1 ([#675](https://github.com/ScilifelabDataCentre/dds_cli/pull/675))
1 change: 1 addition & 0 deletions dds_cli/auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Data Delivery System authentication manager."""

# Standard library
import logging
import getpass
Expand Down
12 changes: 7 additions & 5 deletions dds_cli/data_lister.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,13 @@ def __print_project_table(self, sorted_projects, usage_info, total_size, always_
header_style="bold",
show_footer=self.show_usage and "Usage" in column_formatting,
caption=(
"The cost is calculated from the pricing provided by Safespring (unit kr/GB/month) "
"and is therefore approximate. Contact the Data Centre for more details."
)
if self.show_usage
else None,
(
"The cost is calculated from the pricing provided by Safespring (unit kr/GB/month) "
"and is therefore approximate. Contact the Data Centre for more details."
)
if self.show_usage
else None
),
)

# Add columns to table
Expand Down
14 changes: 8 additions & 6 deletions dds_cli/data_putter.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,14 @@ def put(self, file, progress, task):
"ACL": "private", # Access control list
"CacheControl": "no-store", # Don't store cache
},
Callback=status.ProgressPercentage(
progress=progress,
task=task,
)
if task is not None
else None,
Callback=(
status.ProgressPercentage(
progress=progress,
task=task,
)
if task is not None
else None
),
)
except (
botocore.client.ClientError,
Expand Down
1 change: 1 addition & 0 deletions dds_cli/project_creator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Data Delivery System Project Creator."""

import logging

# Installed
Expand Down
1 change: 1 addition & 0 deletions dds_cli/project_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Data Delivery System Project info manager."""

# Standard library
import logging
import sys
Expand Down
1 change: 1 addition & 0 deletions dds_cli/project_status.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Data Delivery System Project Status manager."""

import datetime
import logging
import typing
Expand Down
1 change: 0 additions & 1 deletion dds_cli/timestamp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Timestamp module."""


###############################################################################
# IMPORTS ########################################################### IMPORTS #
###############################################################################
Expand Down
1 change: 1 addition & 0 deletions dds_cli/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""DDS CLI version."""

# Do not change bump the major version unless absolutely necessary - makes incompatible with API
# If mid or minor version reaches 9, continue to 10, 11 etc.
__version__ = "2.6.1"
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==22.3.0
black==24.1.1
Sphinx==4.5.0
sphinx-rtd-theme==1.0.0
sphinx-click==4.0.0
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup of DDS CLI."""

# pylint: disable=unspecified-encoding, exec-used, consider-using-with, duplicate-code

from setuptools import setup, find_packages
Expand Down

0 comments on commit c7ed477

Please sign in to comment.