Craig Francis

Results 76 comments of Craig Francis

Thanks @TysonAndre, I really appreciate the problem with limited development time... by any chance are you the same Tyson from PHP Internals, with 775 in your email address? Just to...

Would the typeshed upgrade allow "[from typing import LiteralString](https://pyre-check.org/play?input=%23!%2Fusr%2Fbin%2Fenv%20python3.11%0A%0Afrom%20typing%20import%20LiteralString%0A%0Adef%20run_sql(sql%3A%20typing.LiteralString%2C%20parameters%3A%20typing.List%5Bstr%5D%20%3D%20%5B%5D)%20-%3E%20None%3A%0A%20%20print(sql%2C%20%27%5Cn%27%2C%20parameters%2C%20%27%5Cn%27)%0A%0Arun_sql(%27WHERE%20name%20%3D%20%3F%27%2C%20%5Bname%5D)%0Arun_sql(%27WHERE%20name%20%3D%20%27%20%2B%20name)%20%23%20Wrong)" to work? [PEP 675](https://peps.python.org/pep-0675/) implies should. As a side note, "[import typing](https://pyre-check.org/play?input=%23!%2Fusr%2Fbin%2Fenv%20python3.11%0A%0Aimport%20typing%0A%0Adef%20run_sql(sql%3A%20typing.LiteralString%2C%20parameters%3A%20typing.List%5Bstr%5D%20%3D%20%5B%5D)%20-%3E%20None%3A%0A%20%20print(sql%2C%20%27%5Cn%27%2C%20parameters%2C%20%27%5Cn%27)%0A%0Arun_sql(%27WHERE%20name%20%3D%20%3F%27%2C%20%5Bname%5D)%0Arun_sql(%27WHERE%20name%20%3D%20%27%20%2B%20name)%20%23%20Wrong)" and "[from typing_extensions import LiteralString](https://pyre-check.org/play?input=%23!%2Fusr%2Fbin%2Fenv%20python3.11%0A%0Afrom%20typing%20import%20List%0Afrom%20typing_extensions%20import%20LiteralString%0A%0Adef%20run_sql(sql%3A%20LiteralString%2C%20parameters%3A%20List%5Bstr%5D%20%3D%20%5B%5D)%20-%3E%20None%3A%0A%20%20print(sql%2C%20%27%5Cn%27%2C%20parameters%2C%20%27%5Cn%27)%0A%0Arun_sql(%27WHERE%20name%20%3D%20%3F%27%2C%20%5Bname%5D)%0Arun_sql(%27WHERE%20name%20%3D%20%27%20%2B%20name)%20%23%20Wrong)" seem to work. PS:...

Ahh, thanks @JelleZijlstra, it does work on my local machine (with 3.11); and I assume [https://pyre-check.org/play](https://pyre-check.org/play/) will be updated at some point in the future.

Yep, sorry Juliette... will need to do later (thought I could make a quick change before going out).

I've added a few tests, happy to add more, or make other tweaks/changes :-)

Not complete yet... I've got to look at the `array_fill()` test. --- Thanks @jrfnl, your summary is correct. To confirm, you're right, Identifiers are always backtick-quoted (`%i`, `%1$i`, `%10i`, etc);...

Finishing off from yesterday, I've: - Added a comment on [#1903](https://github.com/WordPress/WordPress-Coding-Standards/issues/1903) about how the UnquotedComplexPlaceholder warning might not need to be ignored. - Started [Issue #2078](https://github.com/WordPress/WordPress-Coding-Standards/issues/2078) to verify that the...

Not complete yet, just updating the comments (thanks for the suggestions). I need to re-look at the RegEx one, as my original one checked for a quote prefix, but allowed...

I think that's most of the suggestions. I've not squashed all the commits together yet, in case you want to see what I've changed since. --- The exception is the...

Thanks Juliette, and yep, I'm re-looking at my WP patch for 6.2 (and, on the positive side, I'll be able to include [your suggestions](https://github.com/WordPress/wordpress-develop/pull/3087) this time). Also, the example can...