Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groundwork for mypy support in FuzzManager #776

Draft
wants to merge 144 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
8fb154f
Ignore IDE settings in .gitignore
nth10sd Aug 10, 2021
9ad4d0a
mypy does not like to deal with dashes in folder names
nth10sd Aug 10, 2021
d413fda
Fix mypy complaint about missing __init__.py file
nth10sd Aug 10, 2021
5baf4c0
Add mypy config file adapted from Lithium
nth10sd Aug 10, 2021
c9807f0
Add mypy and other related types packages to Python 3 server requirem…
nth10sd Aug 10, 2021
a0e50ae
Functions that do not return anything should "-> None"
nth10sd Aug 10, 2021
4d8582d
Ignore gdb being undefined, for mypy
nth10sd Aug 10, 2021
8ef0b7c
"mypy ." should work in root FuzzManager directory even if we do not …
nth10sd Aug 12, 2021
818cb82
Convert 3 functions in Collector/Collector.py to be typed
nth10sd Aug 12, 2021
6ce7f48
Fix another 24 mypy issues by declaring proper type information
nth10sd Aug 16, 2021
ccda18f
Merge branch 'master' into basic-mypy-infrastructure
nth10sd Aug 16, 2021
5013740
More type information
nth10sd Aug 21, 2021
29526d0
Merge remote-tracking branch 'upstream/master' into basic-mypy-infras…
nth10sd Aug 31, 2021
100a107
Remove unused import for now
nth10sd Aug 31, 2021
da87ca6
Use annotations from __future__, which will require Python 3.7+
nth10sd Sep 1, 2021
df75fc2
Stop testing on Python 3.6
nth10sd Sep 1, 2021
67572a7
Use built-in tuple instead of Tuple since we now import annotations f…
nth10sd Sep 1, 2021
d2008be
Make createCrashSignature and generate functions typed, defaults from…
nth10sd Sep 1, 2021
4198e1e
Make getSanitizedAssertionPattern typed
nth10sd Sep 1, 2021
b514f2f
Merge branch 'master' into basic-mypy-infrastructure
nth10sd Nov 29, 2021
325246c
More type information, especially for CrashInfo
nth10sd Nov 29, 2021
81a2d79
More type info progress in FTB
nth10sd Nov 29, 2021
3cf241b
Remove stray reveal_type call
nth10sd Nov 29, 2021
4fe7c69
More type information especially for ProgramConfiguration
nth10sd Nov 29, 2021
737d546
Add required typing modules
nth10sd Nov 29, 2021
be22571
More assorted type information
nth10sd Nov 29, 2021
aa9aa2a
Also get the boto3-stubs and celery-types packages
nth10sd Nov 29, 2021
9fb19dc
Add more type information for CrashSignature and Symptom from FTB
nth10sd Nov 29, 2021
d6d85bd
More type information - now down to 2,145 remaining
nth10sd Dec 2, 2021
ade368d
Move stubs packages to requirements3.0.txt
nth10sd Dec 2, 2021
0d2fab4
2086 mypy issues left
nth10sd Dec 2, 2021
ba3b24e
2073 mypy issues left
nth10sd Dec 2, 2021
2f6a0a9
1897 mypy issues left
nth10sd Dec 2, 2021
11bf7ec
Some small type information follow-ups
nth10sd Dec 2, 2021
11e916a
1827 mypy issues left
nth10sd Dec 12, 2021
2c39154
Add some more type information
nth10sd Dec 12, 2021
da20089
Move PyPI requirements to a new requirements3.10.txt file and revert …
nth10sd Dec 12, 2021
040044b
Bump server requirements3.10.txt package versions to latest and remov…
nth10sd Dec 12, 2021
68a1b92
1740 mypy issues left
nth10sd Dec 12, 2021
486f912
Revert "Bump server requirements3.10.txt package versions to latest a…
nth10sd Dec 12, 2021
ed971ef
Rename from requirements3.10.txt to requirements3.7.txt
nth10sd Dec 12, 2021
daeed35
Update requirements3.7.txt pytest-related packages and remove Python …
nth10sd Dec 12, 2021
459ae00
Also bump attrs and pluggy versions as latest pytest 6.2.5 requires them
nth10sd Dec 12, 2021
82ec20c
Remove some mypy ignore messages since we are now on a pytest version…
nth10sd Dec 14, 2021
d2a9666
Bump mypy to 0.920
nth10sd Dec 16, 2021
4c073b5
Add djangorestframework-stubs as a dependency
nth10sd Dec 16, 2021
c7765bd
1672 mypy issues left
nth10sd Dec 16, 2021
20e7987
1656 mypy issues left
nth10sd Dec 16, 2021
7a39d21
Use mock from unittest in stdlib since FuzzManager will be Python 3.7+
nth10sd Dec 16, 2021
e240fbf
1649 mypy issues left
nth10sd Dec 16, 2021
8af00f1
Try turning on mypy on GitHub Actions temporarily
nth10sd Dec 16, 2021
abb40b3
Revert "Try turning on mypy on GitHub Actions temporarily"
nth10sd Dec 16, 2021
3800c84
Switch to use typing-extensions since we are trying to aim for Python…
nth10sd Dec 16, 2021
fa9255c
1639 mypy issues left
nth10sd Dec 16, 2021
9abd823
Try turning on mypy on GitHub Actions temporarily
nth10sd Dec 16, 2021
c74794e
FuzzManager is still on master branch
nth10sd Dec 20, 2021
508356c
Try turning on GitHub Actions also on push on the master branch
nth10sd Dec 20, 2021
cb1cb57
Turn on GitHub Actions on this branch
nth10sd Dec 20, 2021
7cc7a27
Try running CI only on basic-mypy-infrastructure branch
nth10sd Dec 21, 2021
5af24fe
Disable fail-fast for GitHub Actions
nth10sd Dec 21, 2021
ccd29bd
Run mypy on GitHub Actions properly
nth10sd Dec 21, 2021
a7c0854
Add taskcluster as a requirement
nth10sd Dec 21, 2021
f184241
Tweak typing dependency versions
nth10sd Dec 21, 2021
7314809
Add types-setuptools dependency
nth10sd Dec 21, 2021
9346f3b
Add mozilla-django-oidc and mozillapulse as dependencies since they a…
nth10sd Dec 21, 2021
a842034
Change pyproject.toml mypy settings to specify exact modules to ignor…
nth10sd Dec 21, 2021
ac48dd5
Bump mypy to 0.921 for some hotfixes
nth10sd Dec 22, 2021
6331cf5
1614 mypy issues left
nth10sd Dec 22, 2021
fbc294f
Bump mypy to 0.930
nth10sd Dec 23, 2021
4af804b
Typing for ffpuppet is now in the works
nth10sd Dec 24, 2021
fee0c7c
Bump types-* package versions
nth10sd Dec 30, 2021
ff4474d
Revert isinstance assert checks to checking that they are not None
nth10sd Jan 7, 2022
4cb397e
Bump mypy to 0.931
nth10sd Jan 8, 2022
d2af631
1598 mypy issues left
nth10sd Jan 11, 2022
3a5b563
1558 mypy issues left
nth10sd Jan 11, 2022
619415a
1541 mypy issues left
nth10sd Jan 11, 2022
ae5c6cc
More type information for Collector/tests/test_Collector.py
nth10sd Jan 11, 2022
8b38990
Revert a mypy ignore line
nth10sd Jan 18, 2022
dd5c6e6
1521 mypy issues left
nth10sd Jan 18, 2022
f232f2f
1464 mypy issues left - add return type None to __init__ functions in…
nth10sd Jan 28, 2022
59b0315
Bump types-boto version
nth10sd Jan 29, 2022
1d81713
1454 mypy issues left
nth10sd Jan 29, 2022
1ede496
1448 mypy issues left
nth10sd Jan 29, 2022
4917272
1443 mypy issues left
nth10sd Jan 30, 2022
a5103c8
1442 mypy issues left
nth10sd Jan 30, 2022
40c8674
1423 mypy issues left
nth10sd Jan 30, 2022
e868d59
1411 mypy issues left
nth10sd Jan 30, 2022
a45114d
1400 mypy issues left
nth10sd Jan 31, 2022
bb0c152
1396 mypy issues left
nth10sd Jan 31, 2022
5ca38c1
1395 mypy issues left
nth10sd Jan 31, 2022
fba6789
1374 mypy issues left
nth10sd Feb 2, 2022
fa5d4eb
1320 mypy issues left
nth10sd Feb 3, 2022
83e0d83
1296 mypy issues left
nth10sd Feb 5, 2022
5bfa4d0
1281 mypy issues left
nth10sd Feb 5, 2022
4d615d7
1267 mypy issues left
nth10sd Feb 5, 2022
956a7b9
1255 mypy issues left
nth10sd Feb 6, 2022
27382e9
1239 mypy issues left
nth10sd Feb 6, 2022
8f1c67e
1162 mypy issues left
nth10sd Feb 6, 2022
8780df0
1157 mypy issues left
nth10sd Feb 6, 2022
2c8a9ae
1037 mypy issues left
nth10sd Feb 7, 2022
d44b586
928 mypy issues left
nth10sd Feb 7, 2022
91a73fa
822 mypy issues left
nth10sd Feb 7, 2022
b93b828
799 mypy issues left
nth10sd Feb 12, 2022
6fd17db
749 mypy issues left
nth10sd Feb 12, 2022
78d09f1
746 mypy issues left
nth10sd Feb 12, 2022
105390d
727 mypy issues left
nth10sd Feb 19, 2022
4aa38ee
Merge remote-tracking branch 'upstream/master' into basic-mypy-infras…
nth10sd Feb 19, 2022
119aac3
725 mypy issues left
nth10sd Feb 19, 2022
d4139e2
651 mypy issues left
nth10sd Feb 20, 2022
b8b6bed
640 mypy issues left
nth10sd Feb 20, 2022
550d897
624 mypy issues left
nth10sd Feb 20, 2022
84137bf
620 mypy issues left
nth10sd Feb 20, 2022
2f72b6d
589 mypy issues left
nth10sd Feb 21, 2022
168cabe
457 mypy issues left
nth10sd Feb 21, 2022
4915206
Merge branch 'blackblackblack' into rebase-gkw-mypy
jschwartzentruber Feb 25, 2022
8107b92
Rename variables for different with blocks
nth10sd Mar 5, 2022
d5b3433
Remove unused imports that were added inadvertently
nth10sd Mar 6, 2022
763b1e2
TEMP Changes from my other mypy-support branch
nth10sd Mar 15, 2022
92be504
Revert "TEMP Changes from my other mypy-support branch"
nth10sd Mar 15, 2022
46814ab
Turn on mypy plugins for django-stubs and djangorestframework-stubs
nth10sd Mar 15, 2022
1c6c5c5
Reorder mypy plugin settings
nth10sd Mar 15, 2022
1c9e4cc
Merge branch 'master' into basic-mypy-infrastructure
nth10sd May 2, 2022
6593c25
Remove casting in models
nth10sd May 2, 2022
e334818
Replace ::set-output with new syntax
nth10sd Oct 18, 2022
dffdfa0
Update GitHub Actions actions to newer versions since Node.js 12 is g…
nth10sd Oct 18, 2022
a4786c8
Merge branch 'master' into basic-mypy-infrastructure
nth10sd Feb 4, 2023
55f8b44
Restrict tox to 3.x series as the later ones require packaging>=22
nth10sd Feb 4, 2023
bcea233
Bump mypy and related packages that are run under tox
nth10sd Feb 4, 2023
c858db3
Turn on --explicit-package-bases for mypy
nth10sd Feb 4, 2023
51eceb8
Install more typestubs packages that did not get installed automatically
nth10sd Feb 4, 2023
c8b919e
Remove apps from settings.py, via tox settings, to try and make mypy …
nth10sd Feb 4, 2023
7b9dbfd
Ignore more package not found mypy errors, mostly around the ones in …
nth10sd Feb 4, 2023
bcd3f4f
Make mypy runs via tox always pass for now, to avoid having to manual…
nth10sd Feb 4, 2023
942f4d9
793 mypy issues left
nth10sd Feb 4, 2023
6a6d12e
791 mypy issues left
nth10sd Feb 4, 2023
c3545cc
Revert server/server/settings.py no matter whether mypy finds issues …
nth10sd Feb 4, 2023
fad54f5
Reorder mypy tox run dependencies and add typing-extensions
nth10sd Feb 4, 2023
99c0ffe
784 mypy issues left
nth10sd Feb 4, 2023
68164ce
Cast response.url to be of the type "str | None"
nth10sd Feb 5, 2023
61c95d8
Cast response to be of the type "HttpResponse"
nth10sd Feb 5, 2023
3b8394a
673 mypy issues left
nth10sd Feb 5, 2023
11b2185
671 mypy issues left
nth10sd Feb 5, 2023
1b5901d
Bump mypy to 1.0.0
nth10sd Feb 7, 2023
65a25d8
668 mypy issues left
nth10sd Feb 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/mypytmp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: mypytmp

on:
push:
branches: [ basic-mypy-infrastructure ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# pip cache dependencies to save time
- uses: actions/cache@v3
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

# - name: Install OS prerequisites
# if: startsWith(runner.os, 'Linux')
# run: sudo apt-get install ripgrep

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -u -m pip install --upgrade pip setuptools wheel
pip install -r server/requirements3.7.txt
pip install --upgrade -e .

- name: Run mypy
run: |
mypy Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ coverage/
# NPM
server/frontend/node_modules
server/frontend/dist

# IDE / Editor
.vscode/
.idea/
Loading