Skip to content

Commit

Permalink
💚 Update static-analysis Python version to 3.9
Browse files Browse the repository at this point in the history
Manually disabling spurious error message arising from a bug in pylint
for Python 3.9, i.e.,

```
pylint...............................................................................Failed
- hook id: pylint
- exit code: 2

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

************* Module structlog_sentry_logger._config
structlog_sentry_logger/_config.py:240:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 9.52/10 (previous run: 9.52/10, +0.00)

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
```
see: [[Python 3.9] Value 'Optional' is unsubscriptable
(unsubscriptable-object) (also Union) #3882](pylint-dev/pylint#3882)
  • Loading branch information
TeoZosa committed Nov 4, 2020
1 parent 99365f7 commit feb73bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.8"
python-version: "3.9"
- name: "Install package"
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ stages:

static-analysis:
<<: *quality
image: python:3.8
image: python:3.9

dependency-security-vulnerability-analysis:
<<: *install-dev-deps
Expand Down
4 changes: 3 additions & 1 deletion structlog_sentry_logger/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ def __init__( # pylint: disable=too-many-arguments
breadcrumb_level: int = logging.INFO,
active: bool = True,
as_extra: bool = True,
tag_keys: Union[List[str], str] = None,
tag_keys: Union[ # pylint: disable=unsubscriptable-object
List[str], str
] = None,
) -> None:
self.breadcrumb_level = breadcrumb_level
super().__init__(
Expand Down

0 comments on commit feb73bc

Please sign in to comment.