dankenigsberg / pydiff Goto Github PK
View Code? Open in Web Editor NEWThis project forked from edwardbadboy/pydiff
Compare Python scripts in syntax level, not in text level.
This project forked from edwardbadboy/pydiff
Compare Python scripts in syntax level, not in text level.
python pydiff.py [--diffdoc] file1 file2 Compare Python scripts in syntax level, not in text level. This tool can help you to find changes in code logic, ignoring code style changes. It does not compare docstrings by default. Add --diffdoc option to compare docstrings as well. Example usage: test_o.py def foo(a, b): pass if __name__ == '__main__': A = [1, 2, 3] print (4, 5, 6), \ "over" foo(1, 2) print 'Hello World' test_n.py def foo(a, b): pass if __name__ == '__main__': A = [1, 2, 3] print (4, 5, 6), "over" fooo( 1, 2) print ('Hello ' 'World') These two files are different, but some differences are just a matter of style. The only significant difference is the function call "foo()" is misspelled in test_n.py. Run pydiff.py, it will report: $ python pydiff.py test_*.py 1 difference(s) first file: test_n.py second file: test_o.py ((8, 'fooo'), (8, 'foo')) This report tells us the changes that might affect the logic of the code, and print related line numbers. In fact pydiff parses the files into Abstract Syntax Tree, and compare the trees recursively. It can also find insertions and deletions. gitpydiff [commitID|branch or tag ref] pydiff all .py and .py.in files in a git commit to it's parent commit. install.sh make symbol link /usr/bin/pydiff to pydiff.py and /usr/bin/gitpydiff to gitpydiff.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.