pep8speaks-org / pep8speaks

A GitHub :octocat: app to automatically review Python code style over Pull Requests
https://pep8speaks.org
MIT License
605 stars 88 forks source link

Ensure compatibility with Python 3.9 and later #224

Closed Unique-Usman closed 5 months ago

Unique-Usman commented 6 months ago

Prior to Python 3.9, the collections module contained Mapping directly. Starting from Python 3.9, Mapping is moved to collections.abc. This commit adds a compatibility check to import Mapping correctly for Python versions 3.9 and later, ensuring the code works across different Python versions. I also replaced all the instance of collections.Mapping to Mapping.