Skip to content

Commit

Permalink
chore: pin the dev requirements to major.minor compatible (#1054)
Browse files Browse the repository at this point in the history
* Change the dependencies to be pinned to the major.minor compatible version.

pyright doesn't use semvar, and breaks some checks in versions newer than the one we use, so exclude that.

* Bump flake8 (and transitive) deps.

* We need to explicitly include setuptools now.

* Use Python 3.11 for now for the linting.

* Use Py 3.11 for setup.py sdist too.
  • Loading branch information
tonyandrewmeyer authored Oct 27, 2023
1 parent c2f8216 commit bee7833
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/framework-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v2

with:
python-version: '3.11'
- name: Install tox
run: pip install tox~=4.2

Expand Down Expand Up @@ -98,6 +99,8 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Build
run: python setup.py sdist
Expand Down
2 changes: 1 addition & 1 deletion ops/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ def _config_set(self, key: str, value: Union[str, int, float, bool]):
'Incorrectly formatted `options.yaml`: `type` needs to be one '
'of [{}], not {}.'.format(', '.join(self._supported_types), declared_type))

if type(value) != self._supported_types[declared_type]:
if type(value) is not self._supported_types[declared_type]:
raise RuntimeError('Config option {} is supposed to be of type '
'{}, not `{}`.'.format(key, declared_type,
type(value).__name__))
Expand Down
22 changes: 11 additions & 11 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
isort==5.11.4
autopep8==1.6.0
flake8==4.0.1
flake8-docstrings==1.6.0
flake8-builtins==2.1.0
pyproject-flake8==4.0.1
pep8-naming==0.13.2
pytest==7.2.1
isort~=5.11
autopep8~=1.6
flake8~=6.1
flake8-docstrings~=1.7
flake8-builtins~=2.1
pyproject-flake8~=6.1
pep8-naming~=0.13
pytest~=7.2
pyright==1.1.317
pytest-operator==0.23.0
coverage[toml]==7.0.5
typing_extensions==4.2.0
pytest-operator~=0.23
coverage[toml]~=7.0
typing_extensions~=4.2

-r requirements.txt

0 comments on commit bee7833

Please sign in to comment.