Skip to content

Commit

Permalink
Upgrade analysis dependencies to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
Photonios committed Nov 4, 2021
1 parent 0b1af77 commit 2a1f315
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 20 deletions.
8 changes: 6 additions & 2 deletions psqlextra/partitioning/range_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ class PostgresRangePartitioningStrategy:
partitioned table."""

@abstractmethod
def to_create(self,) -> Generator[PostgresRangePartition, None, None]:
def to_create(
self,
) -> Generator[PostgresRangePartition, None, None]:
"""Generates a list of partitions to be created."""

@abstractmethod
def to_delete(self,) -> Generator[PostgresRangePartition, None, None]:
def to_delete(
self,
) -> Generator[PostgresRangePartition, None, None]:
"""Generates a list of partitions to be deleted."""


Expand Down
8 changes: 6 additions & 2 deletions psqlextra/partitioning/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ class PostgresPartitioningStrategy:
table."""

@abstractmethod
def to_create(self,) -> Generator[PostgresPartition, None, None]:
def to_create(
self,
) -> Generator[PostgresPartition, None, None]:
"""Generates a list of partitions to be created."""

@abstractmethod
def to_delete(self,) -> Generator[PostgresPartition, None, None]:
def to_delete(
self,
) -> Generator[PostgresPartition, None, None]:
"""Generates a list of partitions to be deleted."""


Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
[tool.black]
line-length = 80
exclude = '''
(
/(
| .env
| env
| venv
| tests/snapshots
)/
)
'''
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ line_length=80
multi_line_output=3
lines_between_types=1
include_trailing_comma=True
not_skip=__init__.py
known_standard_library=dataclasses
known_third_party=pytest,freezegun
float_to_top=true
skip_glob=tests/snapshots/*.py
22 changes: 11 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ def run(self):
"snapshottest==0.6.0",
],
"analysis": [
"black==19.3b0",
"flake8==3.7.7",
"autoflake==1.3",
"autopep8==1.4.4",
"isort==4.3.20",
"sl-docformatter==1.4",
"black==21.10b0",
"flake8==4.0.1",
"autoflake==1.4",
"autopep8==1.6.0",
"isort==5.10.0",
"docformatter==1.4",
],
},
cmdclass={
Expand All @@ -100,7 +100,7 @@ def run(self):
[
[
"autoflake",
"--remove-all-unused-imports",
"--remove-all",
"-i",
"-r",
"setup.py",
Expand Down Expand Up @@ -128,16 +128,16 @@ def run(self):
"Automatically sorts imports",
[
["isort", "setup.py"],
["isort", "-rc", "psqlextra"],
["isort", "-rc", "tests"],
["isort", "psqlextra"],
["isort", "tests"],
],
),
"sort_imports_verify": create_command(
"Verifies all imports are properly sorted.",
[
["isort", "-c", "setup.py"],
["isort", "-c", "-rc", "psqlextra"],
["isort", "-c", "-rc", "tests"],
["isort", "-c", "psqlextra"],
["isort", "-c", "tests"],
],
),
"fix": create_command(
Expand Down
9 changes: 6 additions & 3 deletions tests/test_hstore_autodetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ def _assert_autodetector(changes, expected):
for i, expected_operation in enumerate(expected):
real_operation = operations[i]
_, _, real_args, real_kwargs = real_operation.field.deconstruct()
_, _, expected_args, expected_kwargs = (
expected_operation.field.deconstruct()
)
(
_,
_,
expected_args,
expected_kwargs,
) = expected_operation.field.deconstruct()

assert real_args == expected_args
assert real_kwargs == expected_kwargs
Expand Down

0 comments on commit 2a1f315

Please sign in to comment.