Are there any nontrivial spaces $Y$ so that for all weak homotopy equivalences 
$A\to B$, the induced map $[B, Y]\to [A,Y]$ is bijective? 


This would be a property of the homotopy type of $Y$, and 
if $Y$ is homotopy equivalent to a space with 
has some kind of local structure under which very close maps (probably of 
compact spaces like $S^k$) are 
necessarily homotopic, then it probably won't have this property. 


My idea is to use the following construction: let $L^+ = \{ {1\over n} \mid n \geq 1\}$
and let
$L = \{ 0\} \cup L^+$.
Then this hypothetical local property of $Y$ would ensure that 
the restriction $L \times X \to L^+\times X$
would induce an injection on homotopy sets. But 
 $L\times X$ is weakly equivalent to $\coprod\_{0}^\infty X$, 
and in the latter space we can have maps 
 which are $f$ on $X\times {n}$ for $n > 0$ and $g$ on $X\times 0$, 
where $f\not \simeq g$.



Spaces that invert weak homotopy equivalences.
The answer seems to be "no": only for contractible spaces Y (and Y=$\emptyset$) the functor [-,Y] inverts weak equivalences. As mentioned above I wrote an argument in <https://arxiv.org/abs/1709.08734>. It uses Jeff Strom and Tom Goodwillie's idea of considering a space whose path-components are the singletons. In this case its topology is similar to the cofinite topology.


