Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some codestyle fixes #3646

Closed
wants to merge 2 commits into from
Closed

Some codestyle fixes #3646

wants to merge 2 commits into from

Conversation

Piterden
Copy link

No description provided.

ratelImit: 1500,
version: 'v2',
has: {
publicaPI: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

↑ oops )

Btw, you would make it much easier for me to merge if you could split this into several atomic PRs, otherwise it will quickly run into a conflict with ongoing changes.

Thx anyways!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fokken python regex))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It happens, no worries )

},
'timeframes': {
'1m': '60', // not working for some reason, returns {"server_time":"2018-03-26T03:52:27.912Z","error":true,"warning":false,"response":null,"error_code":-1,"error_message":"Error while trying to fetch historical market data. An invalid resolution was probably used."}
timeframes: {
Copy link
Member

@kroitor kroitor Aug 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't transpile to other languages, unfortunately...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly, 24 or 25?

Copy link
Member

@kroitor kroitor Aug 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meaning the missing quotes here, an unquoted key won't go into Python properly.

@kroitor kroitor self-assigned this Aug 14, 2018
bid: undefined,
bidvOlume: undefined,
ask: undefined,
askvOlume: undefined,
Copy link
Member

@kroitor kroitor Aug 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

↑ Something is broken here and everywhere else, basically... Here it's broken twice: the name should be askVolume, and the quotes should be in place, otherwise it won't work in Python nor in PHP.

@kroitor
Copy link
Member

kroitor commented Aug 14, 2018

, stringToBase'64': string => CryptoJS.enc.Latin1.parse (string).toString (CryptoJS.enc.Base64)
, utf'16ToBase64': string => CryptoJS.enc.Utf16 .parse (string).toString (CryptoJS.enc.Base64)
, base'64ToBinary': string => CryptoJS.enc.Base64.parse (string)
, base'64ToString': string => CryptoJS.enc.Base64.parse (string).toString (CryptoJS.enc.Utf8)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

↑ This also isn't a good sign )

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is my fault

'assets/currencies',
'assets/pairs',
'ticker',
'orderbook',
'trades',
],
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the space before this bracket will destroy Python padding, unfortunately...

@Piterden
Copy link
Author

You want me to fix them? Or not? Do you have a telegram?

@kroitor
Copy link
Member

kroitor commented Aug 14, 2018

I'd be very thankful if you would rather focus on our pending tasks: https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#pending-tasks ;) Basically, the code styling there is such that is compatible with most of languages with a JSON-like type structure. So, every quote and space counts. Thus, there's actually very little freedom for "styling", just because of the requirements to keep it portable across languages. I would not bother (unless you know all three of JS, Python and PHP or a common subset of all of them).

But anyways, if you want to give it a try and want to get a feeling of how the transpiler works, why not, just make sure to read the CONTRIBUTING doc. )

Do you mind if I close this for now? You can resubmit another one anytime later if you want.

@Piterden Piterden closed this Aug 14, 2018
@Piterden
Copy link
Author

Check this out sergeysova/telegram-typings#23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants