PY3.R1722
Use sys exit
Instead of using exit() or quit(), consider using the sys.exit().
Noncompliant Code:
Copy
if __name__ == '__main__':
user = input('Enter user name: ')
print(f'Hello, {user}')
exit(0)
Compliant Code:
Copy
import sys
if __name__ == '__main__':
user = input('Enter user name: ')
print(f'Hello, {user}')
sys.exit(0)