types
Here are 570 public repositories matching this topic...
- I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
When I created [my first PR][my PR], which added types for a package, one of the instructions in the pull request template (populated from [.github/PULL_REQUEST_TEMPLATE.md][PRT]) confused me:
- Test the change in your own code. (Compile and ru
I'm currently trying to type an API using the signal module. At some point, we pass a callback that has the type signal._Handler (see: https://github.com/python/typeshed/blob/master/stdlib/3/signal.pyi#L73), which is not in the signal module, but in typeshed.
If I try to import it, I get an error, and I could not find the proper way to do so in the documentation.
-
Updated
Jun 29, 2020 - TypeScript
-
Updated
Jul 24, 2017 - TypeScript
🚀 Feature request
Current Behavior
flow(
SomeIOType.decode,
... etc
)
Accessing .decode of a type by passing it, causes lint warning:
warning Avoid referencing unbound methods which may cause unintentional scoping of this @typescript-eslint/unbound-method
However the function is specifically bound: this.decode = this.decode.bind(this);
Desi
The in-progress dev docs have a section on developer workflow: https://google.github.io/pytype/developers/index.html. We also have https://github.com/google/pytype/blob/master/CONTRIBUTING.md. They read like standalone docs with no knowledge of each other and contain different, occasionally overlapping (but at least not contradicting, I think) information. We should coordinate them in some way so
My goal is to have the best documentation for each provided type.
If something is unclear in any of the types, please comment or open a PR to improve it.
Some things you could contribute:
- Fix typos.
- Improved description of the type.
- More examples.
- Provide more real-world use-cases. This helps the user understand where a type might come in handy.
- Add links to relevant discu
DateType and DateTimeType and subclasses use datetime.datetime.strptime, which in turn uses the dateutil library. Unfortunately, this library is much slower at ISO8601 date parsing than C-based alternatives (in particular, ciso8601):
import datetime
import ciso8601
%timeit datetime.datetime.strptime('2018-01-01', '%Y-%m-%d')
# 10.5 µs ± 440 ns per loop (mean ± std. dev. of 7 r
Problem
When working in a large codebase, you often need to refer to classes/modules by their full path, e.g.:
module Foo
module Bar
class Baz
end
end
end
module Loo
def make_baz
# This is tedious to type out. Autocomplete is of limited help if there are a lot of possible symbols.
Foo::Bar::Baz.new
end
endProposed solution
In
-
Updated
Jul 3, 2020 - TypeScript
Error messages should contain the key that is invalid.
I have programs like this. They have many properties so the default error messages are not as helpful as they could be.
const Config = rt.Record({
domain: rt.String,
// many more properties
})
export default function platform(cfg: rt.Static<typeof Config>) {
Config.check(cfg)
return JSON.stringify(cfg)
}Vali
-
Updated
Jul 3, 2020 - Clojure
-
Updated
Jul 1, 2020 - TypeScript
The example about UnionToIntersection seems really specific and it doesn't quite make it clear how the resulting "Fn" will be used... Heck, even the source docs say "#darkmagic".
Could anyone please demystify it just a little? At least finish the example to show how Fn will be used, and when will it error.
After lots of internal discussion, it seems that myself with some colleagues at work have concluded that the intent of NoReturn (official docs, pep484) is ambiguous, at least as listed in the docs.
Important: I mention mypy a lot in this, however, my concern isn'
-
Updated
Jun 24, 2020 - Ruby
Add @page type
@page has special rules here: https://developer.mozilla.org/en-US/docs/Web/CSS/@page
This is similar to @viewport which already has a custom type Viewport.
export interface Viewport<TLength = string | 0> {
msHeight?: ViewportHeightProperty<TLength>;
msMaxHeight?: ViewportMaxHeightProperty<TLength>;
msMaxWidth?: ViewportMaxWidthProperty<TLength>;
msMaxZoom?: ViewportMax
-
Updated
Jun 17, 2020 - Reason
What version of Racket are you using?
7.2
What program did you run?
#lang typed/racket/base
(require/typed/provide racket/base
[(add1 inc) (Integer -> Integer)])What should have happened?
Program compiles, as doc for require/typed/provide suggests:
(require/typed/provide m rt-clause ...)I don't know if this is a bug or it is intended a
I'm curious if your visions include making it a feature-complete NN training framework?
What will be the master plan? Integrating with Torch/TF/MXNet or build hardware-level compilation framework from scratch?
Also, what is the standard & code of conduct for contributions from the community?
I'm totally convinced of its capability and believe it can fit into the missing link between horiz
input:
(name bool (mu (true 1) (false 1)))output:
encodeBool :: Serialiser Bool
encodeBool true = word8 (fromIntegral 0)
encodeBool false = word8 (fromIntegral 1)expected:
encodeBool :: Serialiser Bool
encodeBool True = word8 (fromIntegral 0)
encodeBool False = word8 (fromIntegral 1)There should be a way to test the rbi so that reviewing PR is easier.
I expect it would be:
- Set up sorbet in this repo
- Set up structure to add testcase & output from
srb tc
When people add rbi, they should also add test cases & expected output
Would it be possible to make the type for JSON columns accept Mapping[str, Any] instead of (in addition to?) Dict[str, Any]? My specific use case is I have a fixed JSON schema that I represent with a TypedDict, but this is only compatible with Mapping, not Dict, so I have to either ignore the type or cast it when crea
-
Updated
Sep 5, 2018 - JavaScript
Right now the only way to restart mypy daemon is to do it manually in terminal. Also the daemon stays up even when exiting PyCharm.
It would be nice to add functions to restart the daemon since you have to do that to load new config files.
-
Updated
Jun 24, 2020 - Ruby
-
Updated
Jan 8, 2018 - JavaScript
Improve this page
Add a description, image, and links to the types topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the types topic, visit your repo's landing page and select "manage topics."
Given the immense popularity of Docker and the need to harden it different per platform (see ideas below) - we'd like to start writing a Docker best practices section.
You're welcome to contribute ideas and write best practices - writing and brainstorming will people is an amazing way to deepen your Docker understanding.
At first, we want to collect ideas for best practices, solidify a list