Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b834006

Browse files
authored
add more functions to format_lib
1 parent d1455c6 commit b834006

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

‎PDL/package/pdlparse/library.py‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def format_lib(library):
7777

7878
with open(library, 'r') as file:
7979
file_content = file.read()
80-
8180
for line in file_content.splitlines():
8281
if '}' in line:
8382
index = line.find('}')
@@ -92,6 +91,27 @@ def format_lib(library):
9291
with open(library, 'w') as edit:
9392
replacement = file_content.replace(f'{name}', f'class {name}')
9493
edit.write(replacement)
94+
if 'int' in line:
95+
if "'" in line:
96+
index_var = line.find("'")
97+
variable = line[index_var+1:-1]
98+
with open(library, 'w') as edit:
99+
replacement = file_content.replace(f"'{variable}'", f"{variable}")
100+
edit.write(replacement)
101+
if 'str' in line:
102+
if not "'" in line:
103+
index_var = line.find('=')
104+
variable = line[index_var+2:]
105+
with open(library, 'w') as edit:
106+
replacement = file_content.replace(f"{variable}", f"'{variable}'")
107+
edit.write(replacement)
108+
if 'flt' in line:
109+
if "'" in line:
110+
index_var = line.find("'")
111+
variable = line[index_var+1:-1]
112+
with open(library, 'w') as edit:
113+
replacement = file_content.replace(f"'{variable}'", f"{variable}")
114+
edit.write(replacement)
95115
else:
96116
pass
97-
117+

‎PDL/package/setup.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
LONG_DESCRIPTION = '''
77
A python package for extracting and handling data from `.pdl` librarys more on github.
88
9-
https://github.com/itzCozi/HashBrowns-Python
9+
https://github.com/itzCozi/Python-Data-Library
1010
'''
1111

1212
# Setting up
1313
setup(
14-
name="hashbrowns",
14+
name="PDLparse",
1515
version=VERSION,
1616
author="Cooper ransom",
1717
author_email="Cooperransom08@outlook.com",
@@ -20,7 +20,7 @@
2020
packages=find_packages(),
2121
install_requires=[],
2222

23-
keywords=['python', 'crypto', 'cryptograpgy', 'rsa', 'hashing-algo'],
23+
keywords=['python', 'data', 'library', 'minimalistic', 'like-toml'],
2424
classifiers= [
2525
"Development Status :: 1 - Beta",
2626
"Intended Audience :: Developers",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /