Package: noprint
NoPrintAboutDo not allow prints in your python code anymore. Official repository of NoPrint package. Packages are scanned recursively.Output readoutVisible always:Critical info - if import of one of your modules results with an exception (or is missing - maybe you mistyped your package?).Final result (success, prints detected or critical error)Verbosity options for-v:Outputs which modules contain print statements at which linesWarning when any of your submodules are missing__init__.pyfiles (reported always as warnings)Receive a warning if one of packages that's being analysed is out of system's scope - it will still be scanned, but that "package" is not reachable outside of that directory, these are e.g.testsdirectoriesReceive a warning if one of your packages is overshadowing a package available on system/environment level, e.g. if you have requested to analyse yourtestdirectory, but Python already has an internal package calledtestVerbosity options for-vv(or-v -von older Python versions):All the options from-vNoPrint will tell you specifically which of your submodules are clear of print statementsRequirementsThere'sNONE!You can use this package to your heart's content. Unless you'd like to develop for it, for this you'll need Black, Pylint and Pytest along with Pytest-cov.InstallationPull straight from this repo to install manually or just use pip:pip install noprintwill do the trick.UsageUse as command:usage:NoPrint[-h][-e][-f][-v][--version]packages[packages...][-m[MULTI]]Donotallowprintsinyourcode.

positionalarguments:packageswhichpackages/modulestocheck,syntax:<package>[.<module>...],e.g.noprintornoprint.cli

options:-h,--helpshowthishelpmessageandexit-e,--error-outexitwitherrorwhenprintisfound(bydefaultonlywarningsareshown)-f,--first-onlyfinishonfirstprintfound-v,--verboseprovidemoreanalysisinformation(usemultiplev's to increase logging level)-m [MULTI], --multi [MULTI]set how many threads to use--version             show program'sversionnumberandexitThankyouforusingNoPrintMultithreadingProvide number of threads after-mparameter. Default's to 1 if not provided or provided without specific number. If 0 or less is given then it will use number of available vCPUs reported by multiprocessing library.Example in Makefile:(venv)root@/DummyProject#maketest{\.venv/bin/activate&&\noprint-evvm0tp&&\echo"Finished!";\}[CLEAR]:[tp.exceptions][CLEAR]:[tp.logger][CLEAR]:[tp.cli][ERROR]:[tp]Line:4[ERROR]:[tp.submodule]Line:20[ERROR]:Printstatementsdetected
make:***[Makefile:4:test]Error1This package performs recursive tests on itself before being merged - you can check suggested usage in Makefile.DevelopmentIf you'd like to develop for this package (for some reason) then it's rather straightforward. On Windows startinit.batcommand (WSL2 required). This will install a local WSL2 image with small Ubuntu environment and set up virtual environment for you. If you're already using Unix-based system, you can just useinit.shas that will create Python virtual environment.Before creating Pull Request, make sure that your tests are passing. This is a small package, so I want to maintain 100% coverage -# pragma: no coveris only allowed in very specific scenarios (like single line method wrapper).Want to show off?Feel free to drop this badge into your repo. Glad to have you onboard.<a href="https://github.com/rgryta/NoPrint"><img alt="NoPrint" src="https://img.shields.io/badge/NoPrint-enabled-blueviolet"></a>