Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from fabianoengler/rename_vars_with_kwargs
Rename vars with kwargs
- Loading branch information
Showing
11 changed files
with
204 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ __pycache__/ | |
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
/dist/ | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Version 0.2.0 | ||
------------- | ||
|
||
Released 2019-11-21 | ||
|
||
- Added keyword args to rename variables. | ||
|
||
|
||
Version 0.1.0 | ||
------------- | ||
|
||
Released 2019-11-21 | ||
|
||
- First public release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
include README.md | ||
include CHANGES.md | ||
include LICENSE.txt | ||
include .coveragerc | ||
recursive-include docs *.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
from dictvars import dictvars, varsnamed | ||
|
||
|
||
myapp = 'MyApp' # global var | ||
|
||
|
||
def somefunc_dictvars(current_user): | ||
form = dict(some='very', complex_='expression') | ||
comments = ['bla', 'bla'] | ||
|
||
return dictvars(form, comments, app=myapp, user=current_user) | ||
|
||
|
||
if __name__ == '__main__': | ||
from pprint import pprint | ||
pprint(somefunc_dictvars('John Do')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
from pathlib import Path | ||
from importlib import import_module | ||
|
||
import pytest | ||
|
||
|
||
modules_names = [p.stem | ||
for p in Path(__file__).parent.glob('*example*.py') | ||
if not p.stem.startswith('test_')] | ||
|
||
|
||
@pytest.mark.parametrize("module_name", modules_names) | ||
def test_examples(module_name): | ||
"""just to make sure all examples are runnable and correct""" | ||
print(module_name) | ||
module = import_module(module_name) | ||
if hasattr(module, 'main'): | ||
module.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters