Files
lada.gaginaandintellij-monorepo-bot 75b1ecd244 [python] Cleanup supported/unsupported versions xmls
- Drop support for python 3.5 & 3.6 in compatibility inspection
- Fix and remove some outdated tests
- Remove xmls for long-unsupported python 2.6 & 3.5
- Regenerate versions.xml
- Remove mentions of OS-specific modules

GitOrigin-RevId: 3265dd1de8a4f7a41119e10c95bb705ca5845efe
2023-11-17 18:57:31 +00:00

13 lines
752 B
Python

# Handle a matched regex
if (<warning descr="Python versions 2.7, 3.7 do not support assignment expressions">match := pattern.search(data)</warning>) is not None:
pass
# A loop that can't be trivially rewritten using 2-arg iter()
while <warning descr="Python versions 2.7, 3.7 do not support assignment expressions">chunk := file.read(8192)</warning>:
pass
# Reuse a value that's expensive to compute
[<warning descr="Python versions 2.7, 3.7 do not support assignment expressions">y := f(x)</warning>, y**2, y**3]
# Share a subexpression between a comprehension filter clause and its output
filtered_data = [y for x in data if (<warning descr="Python versions 2.7, 3.7 do not support assignment expressions">y := f(x)</warning>) is not None]