Comments (7)
Updated licensing stuff on dev to make it clearer.
from unrpyc.
I found another piece of code having the same problem:
unrpyc/decompiler/sl2decompiler.py
Lines 501 to 510 in db48ec6
Also I found some REALLY bad code there, brackets are missing to create a tuple:
unrpyc/decompiler/sl2decompiler.py
Lines 448 to 454 in db48ec6
This file should really be re-read, I am currently porting the file so that's what I am doing but I may have let some errors slip through.
from unrpyc.
but else statements are called only if the loop was ended in a break
I found another piece of code having the same problem:
That is incorrect. Per the python documentation:
In a for loop, the else clause is executed after the loop reaches its final iteration.
In while loop, it’s executed after the loop’s condition becomes false.
In either kind of loop, the else clause is not executed if the loop was terminated by a break.
Also I found some REALLY bad code there, brackets are missing to create a tuple:
Whoops, thanks for the note. Those codepaths aren't taken very often apparently, none of my tests caught it.
from unrpyc.
Sorry, I misread the code I saw to check the else statement behavior.
It's strange that the other code was kept, I get a really big warning when I saw the line. Should some kind of static analysis be put in place to avoid this kind of issue as testing those cases can be quite difficult? (i.e. in testing or Github Actions)
from unrpyc.
Should some kind of static analysis be put in place to avoid this kind of issue as testing those cases can be quite difficult?
If someone cares enough they could. Mind you, this isn't some extreme security code, it's a decompiler for visual novels that I maintain as a hobby. It passes the tests and if issues come up, people can report them. That said, if you know of a decent solution, f feel free to pull request ;)
I saw a post about the thing you're working on a bit earlier btw, fun project. Must've been quite the hassle to port all that
One minor nitpic that I have to make: when porting code between languages, your code still counts as a derivative work. Right now you're claiming copyright over the entire thing as yours and project contributors, while the copyright over ported unrpyc parts should still be from the original contributors. (it should be stated on the top of most of the relevant files, although I might have forgotten it recently).
from unrpyc.
After reading the whole code of unrpyc multiple times for my project I think I can do some contributions, when I'll have the time I'll do this (although Python is not the language I am best at).
For the nitpic I already included the license for unrpyc in my LICENSE files so that Flutter would directly pick them up and show them in the UI with the Renpy license too (I ported Renpy code for mapping stuff). I thought adding the copyright at the start of each file would be redundant as I ship my project as one piece but to be sure I'll had a header for the next release.
from unrpyc.
After reading the whole code of unrpyc multiple times for my project I think I can do some contributions, when I'll have the time I'll do this (although Python is not the language I am best at).
No worries, I'm happy to have more people looking over the code to begin with.
I already included the license for unrpyc in my LICENSE files
License and copyright attributions are two different things. Copyright information is for documenting who created something, and licenses are permissions granted by the copyright holder to other folks. You generally need the copyright notice to determine who the license derives from.
It's also just a bit of a credits thing ofc ;) people have spent a lot of time on this tool.
I also didn't find it at first because the main LICENSE file doesn't link to it afaik, but I did find it listed in the backend folder. That said, our license (MIT) does state that you are required to include the copyright notice, that is supposed to be above there but missing, with it.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
I thought adding the copyright at the start of each file would be redundant
That one is also a bit on me because I seem to have neglected adding the additional significant authors to the main LICENSE file so it's easier to include all of them, I'll update that.
but to be sure I'll had a header for the next release.
Thanks!
from unrpyc.
Related Issues (20)
- Camera statement possibly broken in dev HOT 5
- Tracking issue for removal of ren'py 6/7 backwards compatibility in the ren'py 8 / python 3 move. HOT 24
- Legacy-backports HOT 4
- Dev_py3: Possible missing colons in decompiled v8.2 files HOT 5
- Check for manipulated header fails sometimes HOT 7
- AttributeError: 'RawBlock' object has no attribute 'statements' HOT 12
- AttributeError: 'module' object has no attribute '_loads' with Ren'Py 6.99.12.4.2187 HOT 5
- Instaliation issues HOT 6
- Translate feature is in both unrpyc branches error prone implemented HOT 17
- Interleaved output when multiprocessing is used. HOT 2
- Python string RegEx does not match multiline strings HOT 3
- Failed decompile script 'options.rpyс' from renpy 6.11.2 HOT 11
- How to unrpyc a single file during runtime in a rpy file HOT 13
- Missing guards after argparse for bad arg combinations HOT 1
- Safepickler in Py3 possibly broken HOT 10
- Uncaught exception while running a game with un.rpy HOT 10
- Sometimes "elif True" if generated HOT 3
- ModuleNotFoundError: No module named 'renpy' HOT 4
- After decompiled .rpy files, the game crashed. HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unrpyc.