dfpyre 0.7.4__py3-none-any.whl → 0.7.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dfpyre might be problematic. Click here for more details.

dfpyre/pyre.py CHANGED
@@ -55,10 +55,10 @@ class CodeBlock:
55
55
  self.tags = tags
56
56
 
57
57
  def __repr__(self) -> str:
58
- if self.name in DYNAMIC_CODEBLOCKS:
59
- if self.name == 'else':
60
- return 'CodeBlock(else)'
61
- return f'CodeBlock({self.name}, {self.data["data"]})'
58
+ if self.name == 'dynamic':
59
+ return f'CodeBlock({self.data["block"]}, {self.data["data"]})'
60
+ if self.name == 'else':
61
+ return 'CodeBlock(else)'
62
62
  if 'block' in self.data:
63
63
  return f'CodeBlock({self.data["block"]}, {self.name})'
64
64
  return f'CodeBlock(bracket, {self.data["type"]}, {self.data["direct"]})'
@@ -214,6 +214,7 @@ class DFTemplate:
214
214
  """
215
215
  template_dict = json.loads(df_decode(template_code))
216
216
  template = DFTemplate()
217
+ template._set_template_name(template_dict['blocks'][0])
217
218
  for block_dict in template_dict['blocks']:
218
219
  block_tags = get_default_tags(block_dict.get('block'), block_dict.get('action'))
219
220
  if 'args' in block_dict:
@@ -244,16 +245,6 @@ class DFTemplate:
244
245
  return template
245
246
 
246
247
 
247
- @staticmethod
248
- def receive_from_recode():
249
- print('Waiting for item to be sent...')
250
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
251
- s.connect(('localhost', 31372))
252
- received = s.recv(8192)
253
- print(received)
254
- s.close()
255
-
256
-
257
248
  def _set_template_name(self, first_block):
258
249
  if self.name is not None:
259
250
  return
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dfpyre
3
- Version: 0.7.4
3
+ Version: 0.7.6
4
4
  Summary: A package for creating and modifying code templates for the DiamondFire Minecraft server.
5
5
  Home-page: https://github.com/Amp63/pyre
6
6
  License: MIT
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
- Requires-Dist: mcitemlib (>=0.3.0,<0.4.0)
15
+ Requires-Dist: mcitemlib (>=0.3.1,<0.4.0)
16
16
  Project-URL: Repository, https://github.com/Amp63/pyre
17
17
  Description-Content-Type: text/markdown
18
18
 
@@ -2,11 +2,11 @@ dfpyre/__init__.py,sha256=apPsSxJ1Tztfl71MoORoSmDfX7LyKLYlLwOGeLQUitw,25
2
2
  dfpyre/actiondump.py,sha256=YR5h0ZjgyqNkHUCkLLKS0ovMFZQ8WSKuJQzGncT27cA,2664
3
3
  dfpyre/data/actiondump_min.json,sha256=hFcIbG_G55FWwqRSW6X77ZrKkQiXLs4CGgJrZgyR2Gg,1938799
4
4
  dfpyre/items.py,sha256=WIiuslk6qyPUWSndDFEUqz_TNGUgIb0YgXrwh2Lokfs,11746
5
- dfpyre/pyre.py,sha256=gop5idEA2LVvsLMU9S2D6NQPxhqhZOkfnWhdFpSVblE,18681
5
+ dfpyre/pyre.py,sha256=jJieEL9NfU3RpfPgSaTNZr-oCCyo0B6-u4uoQwaJvEU,18453
6
6
  dfpyre/scriptgen.py,sha256=HHWiJwuZFF3w7f-i7QVDZ_7UE6KNjHIIdAQ_2THPLI8,6027
7
7
  dfpyre/style.py,sha256=YRSKEg5r8rkZH62WkRQYbTPgTWVVGVXLnx4edShs0NM,1001
8
8
  dfpyre/util.py,sha256=KThtsPQh4Ep3UXPvJGw5jrzEcM4cDqDG5IG1FXUQROI,610
9
- dfpyre-0.7.4.dist-info/LICENSE,sha256=nqCBVqcbIX-9lhVDarggfrjgNZoPlKKlyl0-hOPS2wQ,1081
10
- dfpyre-0.7.4.dist-info/METADATA,sha256=An94B0isRB0bwNSlV41IYpwqKiNDveXNWgnfnFx1Stg,11754
11
- dfpyre-0.7.4.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
12
- dfpyre-0.7.4.dist-info/RECORD,,
9
+ dfpyre-0.7.6.dist-info/LICENSE,sha256=nqCBVqcbIX-9lhVDarggfrjgNZoPlKKlyl0-hOPS2wQ,1081
10
+ dfpyre-0.7.6.dist-info/METADATA,sha256=XIsbq2hr4M4m8VSGADygPo29UAiNSaFTHOJ681seKaI,11754
11
+ dfpyre-0.7.6.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
12
+ dfpyre-0.7.6.dist-info/RECORD,,
File without changes