Skip to main content
Namalizer — smart method name normalizer
========================================

It allows you to keep PEP8 naming style, using libraries like `Twisted` or `unittest`.

Here is example:

#!/usr/bin/python
import unittest
from namalizer import pep8


class MyTests(unittest.TestCase):
def set_up(self):
self.a = 'blah'

def test_example(self):
self.assert_equal(self.a, 'blah')


pep8(**locals())
# or
pep8(MyTests)


if __name__ == '__main__':
unittest.main()

Namalizer creates aliases for method with wrong names. In this case,
it will create aliazes in `unittest.TestCase` for methods like `setUp`,
`assertEqual`, etc..

Then, it will see that you created method `set_up` to override base class's
functionality and will create alias `setUp` for this method, this way
when `unittest` will call `setUp`, you version will be called.

Migration
---------

If you use some library with ugly naming method, this regex will help you to
find all places where wrong names are used:

git grep -e '\(\.\|def \)[a-z]\+[A-Z]'

Credits
-------

* Alexander Artemenko <<svetlyak.40wt@gmail.com>> — original author.

Fork the project, contribute and send me patches.

Metadata

Release files for namalizer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for namalizer 0.1.1
File Size Uploaded
namalizer-0.1.1.tar.gz 2.6 kB Details

Release files / namalizer-0.1.1.tar.gz

Download URL namalizer-0.1.1.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
409ecc0476e992b1c2c493207daa98e2ebee8476c214c5a40d5e0edad01608d4
BLAKE2b-256 checksum
How to use checksums
8fd61c0bec28dfd226b7f4dae4d268b2ef27d5a75e558abd42ca8096d7b9067e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page