  We consider general fermionic quantum field theories with a global finite
group symmetry $G$, focusing on the case of 2-dimensions and torus spacetime.
The modular transformation properties of the family of partition functions with
different backgrounds is determined by the 't Hooft anomaly of $G$ and fermion
parity. For a general possibly non-abelian $G$ we provide a method to determine
the modular transformations directly from the bulk 3d invertible topological
quantum field theory (iTQFT) corresponding to the anomaly by inflow. We also
describe a method of evaluating the character map from the real representation
ring of $G$ to the group which classifies anomalies. Physically the value of
the map is given by the anomaly of free fermions in a given representation. We
assume classification of the anomalies/iTQFTs by spin-cobordisms. As a
byproduct, for all abelian symmetry groups $G$, we provide explicit
combinatorial expressions for corresponding spin-bordism invariants in terms of
surgery representation of arbitrary closed spin 3-manifolds. We work out the
case of $G=\mathbb{Z}_2$ in detail, and, as an application, we consider the
constraints that 't Hooft anomaly puts on the spectrum of the infrared
conformal field theory.
