We may have fixed warnings in some files so that the files are now completely clean. Good news! Let's add them to .nitignore to prevent regression.
(
files_with_expected_nits: set[str], files_with_nits: set[str]
)
| 235 | |
| 236 | |
| 237 | def fail_if_improved( |
| 238 | files_with_expected_nits: set[str], files_with_nits: set[str] |
| 239 | ) -> int: |
| 240 | """ |
| 241 | We may have fixed warnings in some files so that the files are now completely clean. |
| 242 | Good news! Let's add them to .nitignore to prevent regression. |
| 243 | """ |
| 244 | files_with_no_nits = files_with_expected_nits - files_with_nits |
| 245 | if files_with_no_nits: |
| 246 | print("\nCongratulations! You improved:\n") |
| 247 | for filename in sorted(files_with_no_nits): |
| 248 | print(filename) |
| 249 | print("\nPlease remove from Doc/tools/.nitignore\n") |
| 250 | return -1 |
| 251 | return 0 |
| 252 | |
| 253 | |
| 254 | def fail_if_new_news_nit(warnings: list[str], threshold: int) -> int: |
no outgoing calls
no test coverage detected
searching dependent graphs…