Skip to content

Config settings for gradual adoption #8034

Answered by erictraut
jrheard-seesaw asked this question in Q&A
Discussion options

You must be logged in to vote

For general guidance in applying gradual adoption of type checking, refer to this documentation.

If you want to exclude certain files or directories from the project, you can use the exclude, but I don't recommend that approach. Instead, I recommend enabling a few diagnostic checks for your entire project, then gradually add diagnostic rules as you fix type issues in your code. If a particular file is too problematic (e.g. contains significant dynamic code), you can explicitly disable specific diagnostic checks for that file using a file-level comment.

This is the approach I've used successfully for gradually adopting typing for several large Python code bases.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@rchiodo
Comment options

@jrheard-seesaw
Comment options

@rchiodo
Comment options

@erictraut
Comment options

Answer selected by jrheard-seesaw
@jrheard-seesaw
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants