Skip to content

Commit

Permalink
fix lint errors and skip redundant GHA steps (#1598)
Browse files Browse the repository at this point in the history
* fix lint errors

* cache based on pyproject file not non-existent setup.py

* skip lint and docs that are covered by other GHA
  • Loading branch information
adehad committed Jan 29, 2023
1 parent 2e14696 commit d2ff4f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/jira_server_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
path: ${{ steps.pip-cache.outputs.dir }}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('pyproject.toml') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
Expand All @@ -47,6 +47,7 @@ jobs:
python -m pip install --upgrade tox tox-gh-actions
- name: Lint with tox
if: ${{ 'Skipped as pre-commit GHA also running'== 'true' }}
run: tox -e lint

- name: Test with tox
Expand All @@ -62,4 +63,5 @@ jobs:
run: tox -e packaging

- name: Make docs
if: ${{ 'Skipped as readthedocs GHA also running'== 'true' }}
run: tox -e docs
2 changes: 1 addition & 1 deletion jira/resilientsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def __init__(self, timeout=None, max_retries: int = 3, max_retry_delay: int = 60
def _jira_prepare(self, **original_kwargs) -> dict:
"""Do any pre-processing of our own and return the updated kwargs."""
prepared_kwargs = original_kwargs.copy()

self.headers: CaseInsensitiveDict
request_headers = self.headers.copy()
request_headers.update(original_kwargs.get("headers", {}))
prepared_kwargs["headers"] = request_headers
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ markers = ["allow_on_cloud: opt in for the test to run on Jira Cloud"]
python_version = 3.8
warn_unused_configs = true
namespace_packages = true
# check_untyped_defs = true

0 comments on commit d2ff4f6

Please sign in to comment.