Skip to content

Commit

Permalink
Update black to 23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
paul121 committed Aug 1, 2023
1 parent 65bed44 commit ecd9002
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@stable
with:
version: "~= 23.0"
- run: pip install bandit black codespell flake8 isort mypy pyupgrade safety
- run: bandit --recursive --skip B101,B106 .
- run: black --check .
- run: codespell # --ignore-words-list="" --skip=""
- run: flake8 . --count --max-complexity=11 --max-line-length=113 --show-source --statistics
- run: isort --check-only --profile black .
Expand Down
1 change: 0 additions & 1 deletion farmOS/client_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def iterate(self, entity_type, bundle=None, params=None):
more = False

def send(self, entity_type, bundle=None, payload=None):

# Default to empty payload dict.
if payload is None:
payload = {}
Expand Down
2 changes: 0 additions & 2 deletions farmOS/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def __init__(
*args,
**kwargs,
):

# Default to the "farm_manager" scope.
if scope is None:
scope = "farm_manager"
Expand Down Expand Up @@ -113,7 +112,6 @@ def http_request(self, path, method="GET", options=None, params=None, headers=No
)

def _http_request(self, url, method="GET", options=None, params=None, headers=None):

# Automatically follow redirects, unless this is a POST request.
# The Python requests library converts POST to GET during a redirect.
# Allow this to be overridden in options.
Expand Down
1 change: 0 additions & 1 deletion farmOS/subrequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def send(
blueprint: Union[SubrequestsBlueprint, List],
format: Optional[Union[Format, str]] = Format.json,
):

if isinstance(blueprint, List):
blueprint = SubrequestsBlueprint.parse_obj(blueprint)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

install_requires = ["requests-oauthlib~=1.3.1", "pydantic~=1.7.3"]

tests_require = ["pytest", "black>=20"]
tests_require = ["pytest", "black~=23.0"]

with open("README.md") as fh:
readme = fh.read()
Expand Down
2 changes: 0 additions & 2 deletions tests/functional/test_subrequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

@farmOS_testing_server
def test_subrequests(test_farm):

plant_type = {
"data": {
"type": "taxonomy_term--plant_type",
Expand Down Expand Up @@ -114,7 +113,6 @@ def test_subrequests(test_farm):
},
}
for response_key, expected_data in response_keys.items():

# Test that each response succeeded.
assert response_key in post_response
assert "headers" in post_response[response_key]
Expand Down

0 comments on commit ecd9002

Please sign in to comment.