-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Python/Pre-commit] Migrate from type_enforced
to mypy
#215
Comments
pishoyg
added a commit
that referenced
this issue
Aug 24, 2024
`jshint`: - Make `.jshint` configuration stricter. Notice that we disabled some of the rules that we can't force the TypeScript compiler to respect. `mypy`: - We disable `mypy` (temporarily) because it requires extensive fixes. Filed #215 to reenable it. - Ignore `.mypy_cache` in `.gitignore`, `stats.sh`, and `.helpers`. YAML Hooks - Add `yamllint` hook. - Add a `.yamlfmt` and `.yamllint` configuration files. Account for them in `stats.sh`. The files were required in order to make the two linters compatible. `.pre-commit-config.yaml` - Reformatted the file to accommodate the new linter requirements: - Add a document start, denoted by `---`. - Set the maximum line length to 80. Rewrite many strings, e.g. by removing the unnecessary quotes, or using the block scalar (denoted by `>` or `|`), or single quotes in order to enable splitting strings to multiple lines. NOTE: https://yaml-multiline.info/ explains YAML strings well. - Rewrote many of the `bash` scripts contained within the file, thanks to the newly-discovered YAML string powers: - Include `set -o nounset` in many of the `bash` scripts. - NOTE: check-do-not-submit` has been fixed. Fix #199. - Delete some redundant `types` specifications. - Delete the `.git` suffix from The paths of a couple of repos. - Changed the TODO about fail-fast to a NOTE because there is currently no action required. - Changed the TODO about installing more hooks from https://pre-commit.com/hooks.html to make it Python-specific, because we already acquired most of the other commits. `json-tool`: - Run on `.csslintrc` and `.jshintrc` as well. `typos`: - Add a new spell-checking hook. (It was problematic, but we're trying to retain it.) Security Hooks: - We add a few hooks that check for leaked secrets. Misc: - Where possible, add links to the configuration pages inside the hook config files. The links don't need to be added to `.pre-commit-config.yaml`, because it already has links to the rpos (albeit not directly to the config pages). But it's helpful to have links in such files as `.yamlfmt`, `.yamllint`, and `eslint.config.mjs`.
pishoyg
added a commit
that referenced
this issue
Aug 26, 2024
The current version is buggy. See python/mypy#10428.
This will probably make your |
pishoyg
added a commit
that referenced
this issue
Aug 26, 2024
pishoyg
changed the title
[Python/Pre-commit] Appease and Enable
[Python/Pre-commit] Migrate from Aug 31, 2024
mypy
type_enforced
to mypy
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
Run `mypy` from a script that triggers it for each project (though now we have placeholders for certain projects, rather than actual triggers), and triggers it once for all files that are not part of any projects. Side changes: - Define the `_grep` helper. See `.helpers` for more information. - Run `shellcheck` with `-x` to allow it to follow sourced files. - Appease `mypy` for shared (non-project-specific) files.
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
NOTE: We deleted the type `field.grp`. It was too costly to retain it in this commit. There is a chance we will have to introduce it for #75 or something else.
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
pishoyg
added a commit
that referenced
this issue
Aug 31, 2024
KELLIA and Crum left! The rest is done. |
pishoyg
added a commit
that referenced
this issue
Sep 1, 2024
pishoyg
added a commit
that referenced
this issue
Sep 1, 2024
pishoyg
added a commit
that referenced
this issue
Sep 1, 2024
pishoyg
added a commit
that referenced
this issue
Sep 1, 2024
pishoyg
added a commit
that referenced
this issue
Sep 1, 2024
- Delete two no-longer-used constants. - Use our `_grep` helper to suppress failures when no match is found.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: